<!-- 我的 -->
<template>
  <view>
	<view class="page-bg pt-3">
		  <view class="text-center py-4" style="">
			  <text style="font-size: 34rpx; font-weight: 700;">我的</text>
		  </view>
		  
		  <view class="p-2">
			  <view class="user-info flex align-center">
				<u--image width="120rpx" height="120rpx" src="/static/images/ui/verify/head.png" shape="circle"></u--image>
				<view class="ml-3">
				  <view style="font-size: 40rpx; font-weight: 500;">{{$store.getters.name}}</view>
				  <view style="font-size: 26rpx; font-weight: 400;">{{$store.state.user.phone}}</view>
				</view>
			  </view>
			  <view class="base-info mt-5">
				  <view class="bt-block">
					  <bg-cell :showArrow="true" @click="gotoBase()">
						  <view class="flex">
								<u--image width="42rpx" height="42rpx" src="/static/images/ui/index/jbzl.png"></u--image>
								<view class="ml-1 font-1">基本资料</view>
						  </view>
					  </bg-cell>
					  <bg-cell :showArrow="true" @click="gotoWork()">
						<view class="flex">
								<u--image width="42rpx" height="42rpx" src="/static/images/ui/index/wdgz.png"></u--image>
								<view class="ml-1 font-1">我的工作</view>
						</view>
					</bg-cell>
					<bg-cell :showArrow="true" @click="gotoContract">
						<view class="flex">
							<u--image width="42rpx" height="42rpx" src="/static/images/ui/index/wdht.png"></u--image>
							<view class="ml-1 font-1">我的合同</view>
						</view>
					</bg-cell>
					<bg-cell :showArrow="true" :border="false" @click="gotoMoney">
						<view class="flex">
							<u--image width="42rpx" height="42rpx" src="/static/images/ui/index/wdqb.png"></u--image>
							<view class="ml-1 font-1">我的钱包</view>
						</view>
					</bg-cell>
				  </view>
			  </view>
		  </view>
		  <!-- <u-button @click="testPage">测试</u-button> -->
		  <view class="foot-btn">
				<u-button @click="gotoLogin" plain text="退出登录"></u-button>
		  </view>
	  </view>
  </view>
</template>

<script>
  import {removeToken} from "@/utils/auth.js"
  export default {
	mounted() {
		const eventChannel = this.getOpenerEventChannel();
		eventChannel.on('acceptDataFromOpenerPage', (data)=>{
		      console.log('acceptDataFromOpenerPage', data)
		})
	},
    data() {
      return {
        
      }
    },
    computed: {
      
    },
    methods: {
      gotoBase(){
		  uni.navigateTo({
		  	url:"/pages/mine/info/index"
		  })
	  },
	  gotoWork(){
		  uni.navigateTo({
		  	url:"/pages/mine/work/work"
		  })
	  },
	  gotoContract(){
		  uni.navigateTo({
		  	url:"/pages/mine/contract/contract"
		  })
	  },
	  gotoMoney(){
		  uni.navigateTo({
		  	url:"/pages/mine/money/money"
		  })
	  },
	  gotoLogin(){
		  removeToken()
		  uni.navigateTo({
		  	url:"/pages/login"
		  })
	  },
	  testPage(){
		// uni.navigateTo({
		//   	url:"/pages/salary/retire/auth-step/auth-step"
		// })
		uni.$emit('page-popup', {
			authList:[{
						"auditUserName": "吕洋",
						"auditTime": "2025-02-26 22:12:57"
					},
					{
						"auditTime": "2025-02-26 22:30:55",
						"auditUserName": "吕洋",
						"status": "2",
						"copyUserName": null,
						"auditRole": "班组长"
					},
					{
						"auditTime": "2025-02-26 22:30:55",
						"auditUserName": "lif ",
						"status": "1",
						"copyUserName": "得到的",
						"auditRole": "项目管理员"
					}]
		});
		const subNVue = uni.getSubNVueById('auth-step')
		subNVue.show('slide-in-top', 250)
	  }
    }
  }
</script>

<style lang="scss">
  .page-bg {
	  height: 820rpx;
	  background-image: url('/static/images/ui/index/bg.png');
  }
  .foot-btn {
	  position: absolute;
	  bottom:40rpx;
	  width: 100%;
	  padding: 0 24rpx;
  }
</style>
